﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using FDSimpleModelGenerator.Entities;
using FDSimpleModelGenerator.Entities.Enums;

namespace FDSimpleModelGenerator.IServices
{
    /// <summary>
    /// 配置解析器
    /// </summary>
    public interface IDbConfigResolver
    {
        /// <summary>
        /// 数据库类型
        /// </summary>
        DbType DbType { get; }

        /// <summary>
        /// 解析出连接字符串
        /// </summary>
        /// <param name="dbConfig"></param>
        /// <returns></returns>
        string GetConnectionString(DbConfig dbConfig);

        /// <summary>
        /// 解析出连接字符串
        /// </summary>
        /// <param name="dbConfig"></param>
        /// <returns></returns>
        Task<string> GetConnectionStringAsync(DbConfig dbConfig);
    }
}
